#include<iostream>
#include<unistd.h>
using namespace std;

int main(int argc, char *argv[], char *env[])
{
  int i = 0;
  //打印命令行参数
  for(; argv[i]; i++)
  {
    printf("argv[%d] : %s\n", i, argv[i]);
  }

  printf("------------------------\n");

  //打印环境变量
  for(i = 0; env[i]; i++)
  {
    printf("env[%d] : %s\n", i, env[i]);
  } 

  printf("------------------------\n");
   
  cout << "hello c++, i'm c++ pragma!, mypid: " << getpid() << endl;
  cout << "hello c++, i'm c++ pragma!, mypid: " << getpid() << endl;
  cout << "hello c++, i'm c++ pragma!, mypid: " << getpid() << endl;
  cout << "hello c++, i'm c++ pragma!, mypid: " << getpid() << endl;
  cout << "hello c++, i'm c++ pragma!, mypid: " << getpid() << endl;
  cout << "hello c++, i'm c++ pragma!, mypid: " << getpid() << endl;

  return 0;
}

